#include<stdio.h>
int main()
{	    	 	   	
    char ch;
    int i, flag = 1;

    printf("Input your password:\n");
    for (i = 0; i < 6;)                 //2
    {	    	 	   	
        ch = getchar();                 //1
        if (ch >= '0' && ch <= '9')     //2
        {	    	 	   	
            i++;                        //2
            printf("%c, you have enter %d-bits number\n", ch, i);//1
            getchar();
        }
        else                            //1
        {	    	 	   	
            printf("error\n");          //1
            getchar();
        }
    }
    return 0;
}	  